home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Framewrk / FWPart / Include / FWLnkCmd.h < prev    next >
Encoding:
Text File  |  1996-04-25  |  2.9 KB  |  111 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWLnkCmd.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWLNKCMD_H
  11. #define FWLNKCMD_H
  12.  
  13. #ifndef FWCMD_H
  14. #include "FWCmd.h"
  15. #endif
  16.  
  17. // ----- OpenDoc Includes -----
  18.  
  19. #ifndef FWODTYPS_H
  20. #include "FWODTyps.h"
  21. #endif
  22.  
  23. //========================================================================================
  24. //    Forward Declarations
  25. //========================================================================================
  26.  
  27. class FW_CPart;
  28. class FW_CFrame;
  29. class FW_CLinkSource;
  30. class FW_CLinkManager;
  31. class FW_CLinkDestination;
  32. class ODLinkSource;
  33.  
  34. //========================================================================================
  35. //    FW_CPrivCreateLinkSourceCommand - create a link at the source (undoable)
  36. //========================================================================================
  37.  
  38. class FW_CPrivCreateLinkSourceCommand : public FW_CCommand
  39. {
  40.   public:
  41.     FW_DECLARE_AUTO(FW_CPrivCreateLinkSourceCommand)
  42.  
  43. //----- Constructors/Destructor
  44.   public:
  45.     FW_CPrivCreateLinkSourceCommand(Environment* ev,
  46.                                 FW_CFrame* frame,
  47.                                 FW_CLinkManager* linkMgr,
  48.                                 FW_CLinkSource* pendingLink);
  49.  
  50.     virtual ~FW_CPrivCreateLinkSourceCommand();
  51.  
  52. //----- Inherited API
  53.   public:
  54.     virtual void         DoIt(Environment* ev);
  55.     virtual void         UndoIt(Environment* ev);
  56.     virtual void         RedoIt(Environment* ev);
  57.     virtual void        CommitUndone(Environment* ev);
  58.  
  59. //----- Command-specific Methods 
  60.   public:
  61.     ODLinkSource*        GetODLinkSource(Environment* ev);
  62.  
  63. //----- Data Members
  64.   private:
  65.     FW_CLinkManager*    fLinkMgr;
  66.     FW_CLinkSource*        fLinkSource;
  67. };
  68.  
  69. //========================================================================================
  70. //    FW_CPrivCreateLinkCommand - create a link at the destination (undoable)
  71. //========================================================================================
  72.  
  73. class FW_CPrivCreateLinkCommand : public FW_CCommand
  74. {
  75.   public:
  76.     FW_DECLARE_AUTO(FW_CPrivCreateLinkCommand)
  77.  
  78. //----- Constructors/Destructor
  79.   public:
  80.     FW_CPrivCreateLinkCommand(Environment* ev,
  81.                           FW_CFrame* frame,
  82.                           FW_CLinkManager* linkMgr,
  83.                           FW_Boolean fromClipboard);
  84.  
  85.     virtual ~FW_CPrivCreateLinkCommand();
  86.  
  87. //----- Inherited API
  88.   public:
  89.     virtual void         DoIt(Environment* ev);
  90.     virtual void         UndoIt(Environment* ev);
  91.     virtual void         RedoIt(Environment* ev);
  92.     virtual void        CommitUndone(Environment* ev);
  93.  
  94. //----- Command-specific Methods
  95.   public:
  96.     void                SetLink(Environment* ev, FW_CLinkDestination* link);
  97.  
  98. //----- Data Members
  99.   private:
  100.     FW_CLinkManager*        fLinkMgr;
  101.     FW_CLinkDestination*    fLink;
  102. };
  103.  
  104. //---------------------------------------------------------------------------------
  105. inline void FW_CPrivCreateLinkCommand::SetLink(Environment*, FW_CLinkDestination* link)
  106. {
  107.     fLink = link;
  108. }
  109.  
  110. #endif
  111.